﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace QLTV.Reports
{
    public partial class frmOnBoard : DevExpress.XtraEditors.XtraForm
    {
        public frmOnBoard()
        {
            InitializeComponent();
            statusDataBar1.AddControlPrint(gridOnBoard);
        }

        private void frmOnBoard_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'dsReport.tblOnBoarList' table. You can move, or remove it, as needed.
            this.tadOnBoarList.Fill(this.dsReport.tblOnBoarList);

            loadDepartment();
        }
        private void loadDepartment()
        {
            Database.dsReportTableAdapters.tblCrewTypeTableAdapter tadDepart = new Database.dsReportTableAdapters.tblCrewTypeTableAdapter();
            tadDepart.Fill(dsReport.tblCrewType);
            for (int i = 0; i < dsReport.tblCrewType.Rows.Count - 1; i++)
            {

                radioGroup1.Properties.Items.Add(new DevExpress.XtraEditors.Controls.RadioGroupItem(dsReport.tblCrewType.Rows[i]["id"].ToString(), dsReport.tblCrewType.Rows[i]["cTypeName"].ToString()));
            }
        }
    }
}